<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'saleReport.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="${staticPath }/static/bootstrap/bootstrap.min.css" />

<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
<link rel="stylesheet" href="${staticPath }/static/bootstrap/bootstrap-theme.min.css" />

</head>

<body style="margin:0;padding:0">
	<div style="margin-top:10px;text-align: right;">
		<a href="/haierp1/bi/ship/selectBiShipReportBySalesName" style="padding-left:5px;"><input type="button" value="切换到销售员报表"/></a>	
	</div>
	<div style="width:60%;  margin: 0 auto;margin-top:25px;">
		<table class="table table-bordered">
			<c:choose>
				<c:when test="${flage}">
			        <tr class="info">
						<td class="text-center">录入人</td>
						<td class="text-center">录主订单数量</td>
						<td class="text-center">录子订单数量</td>
						<td class="text-center">录Sku数量</td>
					</tr>
					<c:forEach items="${shipMouthList}" var="ship">
						<tr>
							<td style="text-align:center">${ship.userCreate}</td>
							<td style="text-align:center">${ship.statisticOuterOrderNum}</td>
							<td style="text-align:center">${ship.statisticErpOrderNum}</td>
							<td style="text-align:center">${ship.statisticSkuNum}</td>
						</tr>
					</c:forEach>
				</c:when>
				<c:otherwise>
					<tr class="info">
						<td class="text-center">时间</td>
						<td class="text-center">总录主订单数</td>
						<td class="text-center">录入人</td>
						<td class="text-center">录主订单数量</td>
						<td class="text-center">录子订单数量</td>
						<td class="text-center">录Sku数量</td>
					</tr>
					<c:set var="tjNum" value="1" />
					<c:forEach items="${shipSalesNameList}" var="ship">
						<tr>
						<c:if test="${tjNum == 1}">
							<td rowspan=${shipMap[ship.dimensionDate].count} style="text-align:center;vertical-align:middle">${ship.dimensionDate}</td>
							<td rowspan=${shipMap[ship.dimensionDate].count} style="text-align:center;vertical-align:middle">${shipMap[ship.dimensionDate].totalOuterOrderNum}</td>
						</c:if>
							<td style="text-align:center">${ship.inputPerson}</td>
							<td style="text-align:center">${ship.entryOuterNum}</td>
							<td style="text-align:center">${ship.entryErpNum}</td>
							<td style="text-align:center">${ship.entrySkuNum}</td>
						</tr>
						<c:if test="${tjNum == shipMap[ship.dimensionDate].count}">
							<c:set var="tjNum" value="0" />
						</c:if>
				    <c:set var="tjNum" value="${tjNum+1}" />
					</c:forEach>
				</c:otherwise>
			</c:choose>
		</table>
	</div>
</body>
</html>





